function p = timefrepplot(figurename, name, v, a, j)

    if nargin < 5
        [filename, pathname] = uigetfile('*.txt');  % 默认显示所有文件

        fullname = fullfile(pathname, filename);

        data = importdata(fullname, ' ');

        x = data(:, 1);
        
        v = [zeros(1,1); diff(x)];
        a = [zeros(1,1); diff(v)];
        j = [zeros(1,1); diff(a)];

        figurename = filename;
    end

    figure("Name", figurename);

    subplot(2,3,1);
   
    plot(v);
    title([name,'速度曲线']);
    
    subplot(2,3,2);
    plot(a);
    title([name,'加速度曲线']);

    subplot(2,3,3);
    plot(j);
    title([name,'加加速度曲线']);

    subplot(2,3,4);

    fs = 1000;          % 采样频率 (Hz)

    window = hann(128);      % 汉宁窗，窗口长度为2128
    noverlap = 64;%round(0); % 重叠长度，50%重叠
    nfft = 256;                 % FFT点数

    % 计算 STFT
    [s, f, t_stft] = spectrogram(v, window, noverlap, nfft, fs, 'yaxis');

    % 计算幅度谱并转换为分贝（dB）单位
    s_db = 20*log10(abs(s));

    imagesc(t_stft, f, s_db);
    axis xy; % 将 y 轴方向反转，使频率从低到高显示
    title([name,'速度时频图']);
    xlabel('Time (s)');
    ylabel('Frequency (Hz)');
    caxis([-180,0]);
    %colormap('jet'); % 设置颜色映射为 'jet'
    %freezeColors;

    subplot(2,3,5);
    

    % 计算 STFT
    [s, f, t_stft] = spectrogram(a, window, noverlap, nfft, fs, 'yaxis');

    % 计算幅度谱并转换为分贝（dB）单位
    s_db = 20*log10(abs(s));

    imagesc(t_stft, f, s_db);
    axis xy; % 将 y 轴方向反转，使频率从低到高显示

    title([name,'加速度时频图']);
    xlabel('Time (s)');
    ylabel('Frequency (Hz)');
    caxis([-180,0]);
    %colormap('jet'); % 设置颜色映射为 'jet'
    %freezeColors;

    subplot(2,3,6);
    

    % 计算 STFT
    [s, f, t_stft] = spectrogram(j, window, noverlap, nfft, fs, 'yaxis');

    % 计算幅度谱并转换为分贝（dB）单位
    s_db = 20*log10(abs(s));

    imagesc(t_stft, f, s_db);
    axis xy; % 将 y 轴方向反转，使频率从低到高显示

    title([name,'加加速度时频图']);
    xlabel('Time (s)');
    ylabel('Frequency (Hz)');
    caxis([-180,0]);

    colormap('jet'); % 设置颜色映射为 'jet'
    colorbar;

    p = 0;
end